package com.yangchuang.openpicture.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UploadImgaeDTO {
    @NotBlank
    //图片的名称
    private String pictureName;
    @NotNull(message = "分类ID不能为空")
    @Positive(message = "分类ID必须为正整数")
    private Long categoryId;
    @NotBlank
    private String description;
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<String> tags;
}
